package com.pureut.system.controller;

import com.pureut.common.core.web.controller.BaseController;
import com.pureut.common.core.web.domain.AjaxResult;
import com.pureut.system.domain.FileTree;
import com.pureut.system.domain.vo.SupplierAccessVo;
import com.pureut.system.service.FileTreeService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.AbstractMap;

/**
 * @ClassName FileTreeController
 * @Description: 维修文件树结构控制层
 * @Author: try
 * @CreateDate: 2025/4/11 13:49	//创建时间
 * @UpdateUser: try
 * @UpdateDate: 2025/4/11 13:49	//更新时间
 * @UpdateRemark: 更新的信息
 * @Version: 1.0    //版本号
 */
@RestController
@RequestMapping("/fileTree")
public class FileTreeController extends BaseController
{

    @Resource
    private FileTreeService fileTreeService;


    /**
     * 树结构新增
     */
    @PostMapping("/add")
    public AjaxResult add(@RequestBody FileTree fileTree) {
        return toAjax(fileTreeService.add(fileTree));
    }

    /**
     * 树结构
     */
    @GetMapping("/getTree")
    public AjaxResult getTree(FileTree fileTree) {
        return AjaxResult.success(fileTreeService.getTree(fileTree));
    }

    /**
     * 查询文件类型下拉
     */
    @GetMapping("/getFileType")
    public AjaxResult getFileType(FileTree fileTree) {
        return AjaxResult.success(fileTreeService.getFileType(fileTree));
    }

}